package com.cynteka.cyfoman.ui;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class Context {
    private static XmlBeanFactory instance;

    private Context() {

    }

    public static BeanFactory getBeanFactory() {
        synchronized (Context.class) {
            if (instance == null)
                return instance = new XmlBeanFactory(new ClassPathResource("ui-context.xml"));
        }
        return instance;
    }
}
